package me.zhengjie.pm.taskprogress.service;

import me.zhengjie.hr.employeebase.service.dto.EmployeeBaseDto;
import me.zhengjie.pm.projectbase.service.dto.ProjectBaseDto;
import me.zhengjie.pm.taskprogress.domain.TaskProgress;
import me.zhengjie.pm.taskprogress.service.dto.TaskProgressDto;
import me.zhengjie.pm.taskprogress.service.dto.TaskProgressQueryCriteria;
import org.springframework.data.domain.Pageable;
import java.util.Map;
import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;

/**
* @author yuxj
* @date 2020-04-14
*/
public interface TaskProgressService {

    /**
    * 查询数据分页
    * @param criteria 条件
    * @param pageable 分页参数
    * @return Map<String,Object>
    */
    Map<String,Object> queryAll(TaskProgressQueryCriteria criteria, Pageable pageable);

    /**
    * 查询所有数据不分页
    * @param criteria 条件参数
    * @return List<TaskProgressDto>
    */
    List<TaskProgressDto> queryAll(TaskProgressQueryCriteria criteria);

    /**
     * 根据ID查询
     * @param id ID
     * @return TaskProgressDto
     */
    TaskProgressDto findById(Integer id);

    /**
    * 创建
    * @param resources /
    * @return TaskProgressDto
    */
    TaskProgressDto create(TaskProgress resources);

    /**
    * 编辑
    * @param resources /
    */
    void update(TaskProgress resources);

    /**
    * 多选删除
    * @param ids /
    */
    void deleteAll(Integer[] ids);

    /**
    * 导出数据
    * @param all 待导出的数据
    * @param response /
    * @throws IOException /
    */
    void download(List<TaskProgressDto> all, HttpServletResponse response) throws IOException;

    /**
     * 导出数据
     * @param all 待导出的数据
     * @param response /
     * @throws IOException /
     */
    void workhoursDownload(List<TaskProgressDto> all, List<ProjectBaseDto> projectBaseDtos,
                           List<EmployeeBaseDto> employeeList, HttpServletResponse response) throws IOException;
}